 // 获取触发模态框的自定义属性
        var modalButtons2 = document.querySelectorAll("[data-modal-action]");

        // 获取模态框主体
        var modals2 = document.querySelectorAll(".modal2");

        // 监听模态框的按钮事件
        modalButtons2.forEach(function(button) {
            button.addEventListener("click", function() {
                var targetId = this.dataset.modalTarget;
                var targetModal = document.getElementById(targetId);

                if (targetModal) {
                    var action = this.dataset.modalAction;

                    if (action === "open2") {
						// console.log("有执行open2")
                        openModal2(targetModal);
                    } else if (action === "close2") {
						// console.log("有执行close")
					
                        closeModal2(targetModal);
                    }
                }
            });
        });

        // 打开模态框
        function openModal2(modal) {
            modal.style.display = "block";
            modal.querySelector(".modal-content2").classList.remove("modal-hide2");
        }

        // 关闭模态框
        function closeModal2(modal) {
            modal.querySelector(".modal-content2").classList.add("modal-hide2");
            modal.querySelector(".modal-content2").addEventListener("animationend", function () {
                modal.style.display = "none";
            }, { once: true });
        }

        // 监听模态框的关闭时事件
        modals2.forEach(function(modal) {
            var closeButton = modal.querySelector(".close2");
            if (closeButton) {
                closeButton.addEventListener("click", function() {
                    var targetModal = this.closest(".modal2");
                    closeModal2(targetModal);
                });
            }
        });

        // 当用户点击模态框外部时，关闭模态框
        window.onclick = function (event) {
			// console.log("点击了")
            modals2.forEach(function(modal) {
                if (event.target === modal) {
                    closeModal2(modal);
                }
            });
        };